Conventionally, multi-optical axis photoelectric sensors in which photoelectric elements for forming an optical axis are arranged in one row in an elongated casing are well known (for example, see Patent Literature 1). Here, a multi-optical axis photoelectric sensor in which the photoelectric elements are light emitting elements functions as a light emitter, and a multi-optical axis photoelectric sensor in which the photoelectric elements are light receiving elements functions as a light receiver.
A casing of the multi-optical axis photoelectric sensor of Patent Literature 1 has a frame body in which the front and both end surfaces are opened, and caps which close the both end surfaces of the frame body. Then, a light transmissive plate through which light is transmissible is disposed on the front opening of the frame body to close the opening. Moreover, the multi-optical axis photoelectric sensor may be possibly used in a situation where dust and liquid fly, and therefore a sealing portion (elastic member) is interposed in order to seal a gap between the frame body and the light transmissive plate. More specifically, the string-shaped sealing portion is placed in an annular state so as to straddle a support which is formed along a side edge portion of the opening of the frame body, and a communication portion of the cap which is formed so as to communicate with the support. In the case where the string-shaped sealing portion is formed into an annular shape, end portions are adhered together by, for example, an adhesive agent, or, in a state where the end portions are overlapped with each other, the support and the light transmissive plate, or the communication portion and the light transmissive plate are press-bonded to each other, whereby sealing is performed. In order to seal a gap between the frame body and the cap, moreover, a sealing portion (packing) is interposed.